package cn.anecansaitin.industrialization_expansion.api.common.event;

import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;

/**
 * 自定义工具即将破坏方块前触发
 */
@Cancelable
public class ToolBreakBlockEvent extends Event {
    private final ItemStack tool;
    private final BlockPos pos;
    private final PlayerEntity player;

    public ToolBreakBlockEvent(ItemStack tool, BlockPos pos, PlayerEntity player) {
        this.tool = tool;
        this.pos = pos;
        this.player = player;
    }

    public ItemStack getTool() {
        return tool;
    }

    public BlockPos getPos() {
        return pos;
    }

    public PlayerEntity getPlayer() {
        return player;
    }
}
